/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Practica6.practica;

/**
 *
 * @author miguel
 */
public class NodoHeap implements Comparable<NodoHeap> {

    MyVertex v;
    int distancia;
    
    public NodoHeap(MyVertex v, int distancia){
        this.v = v;
        this.distancia = distancia;
    }

    @Override
    public int compareTo(NodoHeap o) {
        return v.getDistancia() > o.v.getDistancia()?1:(v.getDistancia()==o.v.getDistancia()?0:1);
    }
}
